package org.example;

import javafx.application.Application;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

public class Main extends Application {
    public static void main(String[] args) {
        GlobalKeyListenerExample.main(args);
    }

    public static void fengci() {
        String ya = "";
        int inc = 585;
        for (int i = 0; i < 550; i++) {
            if(i < 160) {
                inc = 585 + i;
            }else if(inc<920){
                inc = 585 + i;
            }
//            int inc = (585+i/6);
//            if(i>40) inc = (585+i/3);
            ya += "<MouseMovementEvent>\n" +
                    "          <Type>3</Type>\n" +
                    "          <X>1098</X>\n" +
                    "          <Y>" + inc + "</Y>\n" +
                    "          <Delay>2</Delay>\n" +
                    "        </MouseMovementEvent>\n";
        }
        System.out.println(ya);
    }


    public static void ak3() {

        String s = "<MouseMovementEvent>\n" +
                "          <Type>3</Type>\n" +
                "          <X>1098</X>\n" +
                "          <Y>677</Y>\n" +
                "          <Delay>2</Delay>\n" +
                "        </MouseMovementEvent>\n";
        String ya = "";
        int a = 585;
        for (int i = 0; i < 280; i++) {
            int inc = 585 + i/3;
//            int inc = (585+i/6);
//            if(i>40) inc = (585+i/3);
            ya += "<MouseMovementEvent>\n" +
                    "          <Type>3</Type>\n" +
                    "          <X>1098</X>\n" +
                    "          <Y>" + inc + "</Y>\n" +
                    "          <Delay>1</Delay>\n" +
                    "        </MouseMovementEvent>\n";
        }
        System.out.println(ya);
    }

    public static void xuanzhuan() {
        String ya = "";
        int a = 585;
        for (int i = 0; i < 100; i++) {
            int inc = i*85;
//            int inc = (585+i/6);
//            if(i>40) inc = (585+i/3);
//            if(i>290) inc = 585 + i/3;
            ya += "<MouseMovementEvent>\n" +
                    "          <Type>3</Type>\n" +
                    "          <X>" + inc + "</X>\n" +
                    "          <Y>" + 585 + "</Y>\n" +
                    "          <Delay>1</Delay>\n" +
                    "        </MouseMovementEvent>\n";
        }
        System.out.println(ya);
    }

    public static void left() {
        String ya = "";
        int a = 585;
        for (int i = 0; i < 100; i++) {
            int inc = i*15;
            ya += "<MouseMovementEvent>\n" +
                    "          <Type>3</Type>\n" +
                    "          <X>" + inc + "</X>\n" +
                    "          <Y>" + 585 + "</Y>\n" +
                    "          <Delay>1</Delay>\n" +
                    "        </MouseMovementEvent>\n";
        }
        System.out.println(ya);
    }

    public static void righ() {
        String ya = "";
        int a = 585;
        for (int i = 0; i < 50; i++) {
            int inc = i*6;
            ya += "<MouseMovementEvent>\n" +
                    "          <Type>3</Type>\n" +
                    "          <X>" + inc + "</X>\n" +
                    "          <Y>" + 585 + "</Y>\n" +
                    "          <Delay>1</Delay>\n" +
                    "        </MouseMovementEvent>\n";
        }
        System.out.println(ya);
    }

    public static void aktap5() {

        String s = "<MouseMovementEvent>\n" +
                "          <Type>3</Type>\n" +
                "          <X>1098</X>\n" +
                "          <Y>677</Y>\n" +
                "          <Delay>2</Delay>\n" +
                "        </MouseMovementEvent>\n";
        String ya = "";
        int a = 585;
        for (int i = 0; i < 370; i++) {
            int inc = 585 + i/6;
//            int inc = (585+i/6);
//            if(i>40) inc = (585+i/3);
            if(i>290) inc = 585 + i/3;
                    ya += "<MouseMovementEvent>\n" +
                    "          <Type>3</Type>\n" +
                    "          <X>1098</X>\n" +
                    "          <Y>" + inc + "</Y>\n" +
                    "          <Delay>1</Delay>\n" +
                    "        </MouseMovementEvent>\n";
        }
        System.out.println(ya);
    }

    @Override
    public void start(Stage stage) {
        stage.initStyle(StageStyle.UTILITY);  // 最小化任务栏图标
        stage.setOpacity(0);                 // 完全透明（可选）
        // 后台逻辑...
        main(null);
    }
}